1. Field of the Invention
This invention relates generally to electronic imaging devices, and more particularly to a system and method for anti-aliasing of text overlays on electronic images.
2. Description of the Background Art
One problem associated with the display of text stored in bit-mapped fonts is the effect of aliasing of the displayed text characters. Aliasing is the effect of a diagonal edge of a text character appearing to exhibit a number of discrete jumps or "stairsteps" instead of a smooth, straight line. Bit-mapped fonts are highly susceptible to aliasing but have the advantage of being rapidly updated on bit-mapped displays. However, bit-mapped fonts are not easily scaleable as vectored fonts.
Aliased text images are generally considered to be aesthetically unsatisfactory. The degree of "staircasing" is a function of the resolution of the display and the type and size of font being used. While high-solution displays decrease the effect of aliasing of a given font, such displays are expensive. The "staircasing" effect is especially noticeable when bit-mapped text characters are overlaid on graphic images.
Text strings are overlaid on background graphic images to identify the graphic image in some way. For example, such overlays are used to date- and time-stamp the graphic image. To accomplish the overlay, the text color (foreground color) for the text character pixel is merged with the color of the graphic image pixel (background color) for a given location on the graphic image. The background color and foreground color may be merged together in a variety of ways to overlay the graphic image. For example, the foreground color may completely replace the background color. Another approach would be to merge the two colors by arranging the components of the pixel colors together in some fashion. Thus, if the colors are represented in Red, Green, Blue (RGB) format, the "red" components of the two colors are arranged together, the "green" components of the two colors are arranged together, and the "blue" components of the two colors are arranged together. The three resulting values would then be used for the resulting foreground pixel color to replace the background color on the graphic image.
Furthermore, when image files are stored in a compressed format such as Joint Photographic Experts Group (JPEG), the compression aggravates the effect of the aliasing of the text. In many applications, therefore, vectored fonts are used which require more storage and are slower loading than bit-mapped fonts.
What has been lacking in the art is a quick anti-aliasing method for incorporating bit-mapped fonts with text overlays onto electronic images, especially images that are to be compressed with JPEG or similar formats.